<script>
	$(function() {
		$( "#txtNgaysinh" ).datepicker({dateFormat: 'dd-mm-yy'});
	});
</script>
<script>
	$(function() {
		$( "#txtNgaythamgia" ).datepicker({dateFormat: 'dd-mm-yy'});
	});
</script>


<?php
if (!defined('WEB_ROOT')) {
	exit;
}

$nhomnc_id = (isset($_GET['nhomnc_id']) && $_GET['nhomnc_id'] > 0) ? $_GET['nhomnc_id'] : 0;

$groupList = buildGroupOptions($nhomnc_id);

$dv_id = (isset($_GET['dv_id']) && $_GET['dv_id'] > 0) ? $_GET['dv_id'] : 0;

$deptList = buildDeptOptions($dv_id);
?> 
<div class="onecolumn">
				<div class="header">
					<span>Thêm tác giả</span>
				</div>
				<br class="clear"/>
				<div class="content">
					<form action="processAuthor.php?action=addAuthor" method="post" enctype="multipart/form-data" name="frmAddAuthor" id="frmAddAuthor">
					  <table width="100%" border="0" align="center" cellpadding="5" cellspacing="1" class="entryTable">

					  <tr> 
						   <td width="140" class="label">Mã tác giả</td>
						   <td colspan="3" class="content"> <input name="txtMatg" type="text" class="box" id="txtMatg" size="20" maxlength="20"></td>
					  </tr>
					  <tr> 
						   <td width="140" class="label">Họ tên tác giả</td>
						   <td colspan="3" class="content"> <input name="txtHotentg" type="text" class="box" id="txtHotentg" size="50" maxlength="50"></td>
					  </tr>
					  <tr> 
						   <td width="140" class="label">Ngày sinh</td>
						   <td colspan="3" class="content"><input name="txtNgaysinh" type="text" id="txtNgaysinh" size="20" maxlength="20" class="box"> </td>
					  </tr>
					  <tr> 
						   <td width="140" class="label">Quê quán</td>
						   <td colspan="3" class="content"><input name="txtQuequan" type="text" id="txtQuequan" size="50" maxlength="50" class="box"> </td>
					  </tr>
					  <tr> 
							   
						   <td width="140" class="label">Đơn vị</td>
						   <td class="content"> <select name="cboDept" id="cboDept" class="box">
							<option value="" selected>-- Chọn đơn vị --</option>
								<?php
									echo $deptList;
								?>	 
							</select> 
					  </tr>
					  <tr> 
						   <td width="140" class="label">Chức vụ</td>
						   <td colspan="3" class="content"><input name="txtChucvu" type="text" id="txtChucvu" size="50" maxlength="50" class="box"> </td>
					  </tr>
					  <tr> 
						   <td width="140" class="label">Địa chỉ liên lạc</td>
						   <td colspan="3" class="content"><input name="txtDiachi" type="text" id="txtDiachi" size="70" maxlength="70" class="box"> </td>
					  </tr>
					  <tr> 
						   <td width="140" class="label">Điện thoại nhà riêng</td>
						   <td colspan="3" class="content"><input name="txtDienthoai" type="text" id="txtDienthoai" size="20" maxlength="20" class="box"> </td>
					  </tr>
					  <tr> 
						   <td width="140" class="label">Điện thoại di động</td>
						   <td class="content"><input name="txtDTDD" type="text" id="txtDTDD" size="20" maxlength="20" class="box"> </td>
						   <td class="label">Email</td>
						   <td class="content"><input name="txtEmail" type="text" id="txtEmail" size="30" maxlength="30" class="box" /></td>
					  </tr>
					  <tr> 
						   <td width="140" class="label">Học hàm</td>
						   <td class="content"><input name="txtHocham" type="text" id="txtHocham" size="20" maxlength="20" class="box"> </td>
						   <td class="label">Học vị</span></td>
						   <td class="content"><input name="txtHocvi" type="text" id="txtHocvi" size="20" maxlength="20" class="box" /></td>
					  </tr>
					  <tr> 
						   <td width="140" class="label">Hình ảnh</td>
						   <td colspan="3" class="content"> <input name="fleImage" type="file" id="fleImage" class="box"></td>
					  </tr>
					  <tr> 
						   <td width="140" class="label">Nhóm nghiên cứu</td>
						   <td class="content"> <select name="cboGroup" id="cboGroup" class="box">
							<option value="" selected>-- Chọn nhóm nghiên cứu --</option>
								<?php
									echo $groupList;
								?>	 
							</select></td>
						   <td class="label">Ngày tham gia</td>
						   <td class="content"><input name="txtNgaythamgia" type="text" id="txtNgaythamgia" size="15" maxlength="15" class="box" /></td>
					  </tr>
					 </table>
					 <p align="center"> 
					  <input name="btnAddAuthor" type="button" id="btnAddAuthor" value="Thêm tác giả" onClick="checkAddAuthorForm();" class="box">
					  &nbsp;&nbsp;<input name="btnCancel" type="button" id="btnCancel" value=" Hủy " onClick="window.location.href='index.php';" class="box">  
					 </p>
					</form>
</div>
</div>